{extend name="common/__base" /}

{block name="body"}
<form class="layui-form layui-form-pane">
    <input type="hidden" name="id" value="{$sysInfo.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">网站名称</label>
        <div class="layui-input-block">
            <input type="text" name="name" value="{$sysInfo.name}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">android版本</label>
        <div class="layui-input-block">
            <input type="text" name="android_version" value="{$sysInfo.android_version}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">android地址</label>
        <div class="layui-input-block">
            <input type="text" name="android_url" value="{$sysInfo.android_url}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">ios版本</label>
        <div class="layui-input-block">
            <input type="text" name="ios_version" value="{$sysInfo.ios_version}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">ios地址</label>
        <div class="layui-input-block">
            <input type="text" name="ios_url" value="{$sysInfo.ios_url}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">更新提示语</label>
        <div class="layui-input-block">
            <input type="text" name="update_desc" value="{$sysInfo.update_desc}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">ios上架版本</label>
        <div class="layui-input-block">
            <input type="text" name="up_ios" value="{$sysInfo.up_ios}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" type="submit" id="submit">设置</button>
            <button class="layui-btn layui-btn-primary" type="reset">重置</button>
        </div>
    </div>
</form>
{/block}

{block name="js"}
<script>
    $("#submit").click(function () {
        $.ajax({
            url: "{:url('admin/system/sysInfo')}",
            type: "post",
            data: $("form").serialize(),
            dataType: "json",
            success: function (ret) {
                layer.msg(ret.msg);
            }
        });
        return false;
    });
</script>
{/block}